<template>
  <div class="header-bar">
    <div class="system-name">教育平台</div>
    
    <div class="header-controls">
      <!-- 消息通知 -->
      <div class="message-icon">
        <el-badge :value="unreadCount" class="message-badge">
          <i class="el-icon-bell"></i>
        </el-badge>
      </div>
      
      <!-- 角色切换 -->
      <el-select v-model="currentRole" class="role-select">
        <el-option label="教师端" value="teacher"></el-option>
        <el-option label="学生端" value="student"></el-option>
      </el-select>
      
      <!-- 学科切换 -->
      <el-select v-model="currentSubject" class="subject-select">
        <el-option v-for="subject in subjects" 
                   :key="subject.value" 
                   :label="subject.label" 
                   :value="subject.value">
        </el-option>
      </el-select>
    </div>
  </div>
</template>

<script>
export default {
  name: 'HeaderBar',
  data() {
    return {
      unreadCount: 3,
      currentRole: 'teacher',
      currentSubject: 'math',
      subjects: [
        { label: '数学', value: 'math' },
        { label: '语文', value: 'chinese' },
        { label: '英语', value: 'english' },
        { label: '物理', value: 'physics' },
        { label: '化学', value: 'chemistry' }
      ]
    }
  }
}
</script>

<style scoped>
.header-bar {
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  background: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 20px;
}

.message-icon {
  font-size: 24px;
  cursor: pointer;
}

.role-select, .subject-select {
  width: 120px;
}
</style> 